package cn.org.eshow.service;

import cn.org.eshow.bean.query.AdditionalOrderQuery;
import cn.org.eshow.common.page.Page;
import cn.org.eshow.model.AdditionalOrder;
import cn.org.eshow.model.ProductOrder;
import com.pingplusplus.model.Charge;

import javax.jws.WebService;
import java.util.List;

@WebService
public interface AdditionalOrderManager extends GenericManager<AdditionalOrder, Integer> {

    List<AdditionalOrder> list(AdditionalOrderQuery query);

    Page<AdditionalOrder> search(AdditionalOrderQuery query);

    AdditionalOrder check(AdditionalOrderQuery query);

    Integer count(AdditionalOrderQuery query);

    /**
     * 后台客户输入补单金额和补单说明
     * @param productOrder
     * @param additionalOrder  需要赋值:additionalOrder.name \  additionalOrder.price
     * @return
     */
    AdditionalOrder save(ProductOrder productOrder,AdditionalOrder additionalOrder);

    void pay(Charge charge);

    /**
     * 取消 待付款 订单
     * @param additionalOrder
     * @return
     */
    AdditionalOrder cancel(AdditionalOrder additionalOrder);

    List<AdditionalOrder> list(String hql, Object[] params);

//    void refund(Refund refund);

}